﻿/**
 * Peter
 * Created by: Peter Development Team
 *    http://peter.codeplex.com/
 * 
 * GNU General Public License version 2 (GPLv2)
 *    http://peter.codeplex.com/license
 *
 *  This code is provided on an AS IS basis, with no WARRANTIES,
 *  CONDITIONS or GUARANTEES of any kind.
 *
 **/

using System.Collections.ObjectModel;
using ICSharpCode.NRefactory;
using Peter.Common.Code;

namespace Peter.Logic.IronyGrammers
{
   /// <summary>
   /// Tree item for csharp code item.
   /// </summary>
   public class CSharpCodeItem : BaseCodeItem
   {
      private string m_Comments;

      /// <summary>
      /// Initializes a new code item with no parent.
      /// </summary>
      /// <param name="type">Type of code item.</param>
      /// <param name="position">The position of this item in the document.</param>
      public CSharpCodeItem (ObjectType type, int position)
         : base (type, position)
      {
         this.Modifiers = new Collection<string> ();
      }

      /// <summary>
      /// Gets the collection of modifiers.
      /// </summary>
      public Collection <string> Modifiers { get; private set; }

      /// <summary>
      /// Gets or Sets the return type.
      /// </summary>
      public string ReturnType { get; set; }

      /// <summary>
      /// Gets or Sets the location of the code item.
      /// </summary>
      public TextLocation Location { get; set; }

      /// <summary>
      /// Sets the comments of the code item.
      /// </summary>
      /// <param name="comments"></param>
      public void SetComments (string comments)
      {
         this.m_Comments = comments;
      }
   }
}
